When you're offered a "rate lock" from a lender, it means that you are guaranteed to keep a set interest rate for a certain number of days while you work on your application process. This means your interest rate won't get higher during the application process.
Although there may be a choice of rate lock periods (from 15 to 60 days), the longer ones are usually more expensive. You can get a longer period for your lock, but in doing so, will most likely have a higher interest rate than you would with a shorter span of time
There are other ways to get a better rate, in addition to agreeing to a shorter rate lock period. A larger down payment will give you a better interest rate, since you are starting out with more equity. You can pay points to improve your interest rate over the term of the loan, meaning you pay more up front. One strategy that makes financial sense for many people is to pay points to bring the rate down over the life of the loan. You'll pay more up front, but you will come out ahead, especially if you keep the loan for a long time.
Do you have a question regarding a mortgage program?