Mortgages take a while to process, but a broker or bank can lock in a rate for themselves or their clients. Locking-in rates costs money somewhere along the line, and the longer the rate is locked in, the more it costs.
60 days is generally the longest time frame you will see a rate locked in, due to the cost associated with that risk. Mortgage rates can be locked in for a period of time long enough to underwrite the loan. This might be for a period as short as 20 days or as long as 60 days.
The longer the rate is guaranteed locked-in, the more expensive it is, since there is a risk that this rate will no longer be ideal by the time of closing. The fee is paid either by the lending broker or it is passed on to the borrower.
Since these deals can expire if the paperwork is not sorted out, submitted, and in good order by the end of the rate lock term, some unscrupulous lenders have been known to drag their feet on the paperwork if rates are changing unfavorably.
With a rate lock, a borrower has some time to close on a property while knowing exactly how much the final cost would be. Closing can take around 45 days. In the meantime, home inspectors and closing attorneys have to be brought into the mix, along with real estate agents, and banks or lending brokers and mortgage companies — and possibly even government agencies.
Obviously with so many people involved, things can take a while. Mortgage rates fluctuate on a weekly basis, generally.