When you're offered a "rate lock" from a lender, it means that you are guaranteed to get a certain interest rate for a certain number of days for your application process. This prevents you from getting through your entire application process and finding out at the end that your interest rate has gone up.
Although there might be a choice of rate lock periods (from 15 to 60 days), the longer ones are typically more expensive. The lending institution can agree to hold an interest rate and points for a longer span of time, like 60 days, but in exchange, the rate (and sometimes points) will be more than with a rate lock of a shorter period.
In addition to going with the shorter rate lock period, there are other ways you are able to get the best rate. The larger the down payment, the lower the interest rate will be, because you will have more equity from the start. You might choose to pay points to bring down your interest rate over the loan term, meaning you pay more up front. One strategy that is a good option for many people is to pay points to reduce the rate over the term of the loan. You will pay more initially, but you will come out ahead, especially if you keep the loan for the full term.
Do you have a question regarding a mortgage program?