Locking the price of a mortgage is full of potential problems for the unwary borrower. Locking is especially problematic in today's market because prices can jump around from day to day, and lenders take much longer than in pre-crisis years to approve an application, and often can't.
Locking means that the lender commits that the price at closing will be the lock price, even if the market price is higher at closing than it was on the lock date. The price commitment holds for a specified period, usually 30 to 90 days, with longer periods priced higher. Whether the borrower is equally committed if the price at closing is lower depends on the lender's policy, see below.