A rate "lock" or "commitment" is a promise from the lender to set a specific interest rate and a specific number of points for you for a certain period while your application is processed. This protects you from getting through your whole application process and learning at the end that the interest rate has gone up.
Rate lock periods can be various lengths of time, anywhere from fifteen to sixty days, with the longer period generally costing more. 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 more ways to get a reduced rate, in addition to opting for a shorter rate lock period. A bigger down payment will get you a lower interest rate, since you will have a good deal of equity at the start. You might choose to pay points to bring down 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 reduce the rate over the term of the loan. You will pay more initially, but you will save money, especially if you don't refinance early.
Do you have a question regarding a mortgage program?