When your rate is about to expire, and your loan has not funded yet, you have options:
1. Let it expire, and the day afterwards you can lock in "worst case pricing" - meaning the higher rate between the rates when you locked in initially and the current interest rate.
2. Extend it, and:
a) if the rates are better than when you locked in, the extension with most lenders will be free
b) if the rates are worse than when you locked in, the extension usually has a cost (each lenders cost is different, check with yours, but typically it's 15 day extension for .125 in fee, 30 day extension for .25 in fee, but it can certainly vary)
3. Let it expire, and wait a full 30 days, at which point you can then lock in lower interest rates than when you initially locked, but if you re-lock within the first 30 days after your lock expiration it reverts back to the scenario in #1
So if you do not extend it, prepare for options #1 or #3.
Each lender's lock & extension policy is different, so be sure to ask yours so you aren't devastated by making the wrong move.
Now if you don't even want to buy this house anymore, like the real estate agents here have mentioned, consult your own real estate agent and read your contract, you could potentially lose your earnest money deposit and/or be liable for certain damages.