A rate "lock" or "commitment" is a lender's promise to freeze a specific interest rate and a certain number of points for you for a specified period during your application process. This ensures that your interest rate won't get higher during the application process.
While there are various lengths of rate lock periods (from 15 to 60 days), the longer spans are usually more expensive. You can get a longer period for your lock, but in doing so, will probably have a higher interest rate than you would with a shorter rate lock period
There are other ways to get a good rate, in addition to going with a shorter rate lock period. The larger the down payment, the lower the interest rate will be, since you will have more equity from the beginning. You might choose to pay points to lower your interest rate over the life of the loan, meaning you pay more initially. 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 initially, but you will save money, especially if you don't refinance early.
Do you have a question regarding a mortgage program?