A rate "lock" or "commitment" is a promise from the lender to hold a certain interest rate and a particular number of points for you for a certain period during your application process. This keeps you from going through your whole application process and discovering at the end that the interest rate has gotten higher.
While there can be a choice of rate lock periods (from 15 to 60 days), the longer spans are typically more expensive. A lender may agree to hold an interest rate and points for a longer period, such as sixty 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 lock period, there are other ways you can attain the lowest rate. A larger down payment will give you a better interest rate, since you'll have a good amount of equity from the beginning. You can pay points to improve your rate over the loan term, meaning you pay more up front. One strategy that makes financial sense for some is to pay points to bring the rate down over the term of the loan. You will pay more initially, but you will come out ahead in the end.
Do you have a question regarding a mortgage program?