If you know that you will be moving in 3 to 5 years, you might want to consider refinancing to a 3 or 5 year ARM (adjustable rate mortgage). These loans typically have a much lower rate that a traditional fixed rate loan such as a 30 year fixed, but they do have a fixed rate for the first 3 or 5 years of the loan. This will enable you to benefit from the lower rate, but you won't ever have to worry about the risk of a rate adjustment because you will be selling the home before the fixed-rate period ends.
Refinancing a mortgage means the owners are paying off their existing mortgage and replacing that mortgage with a new loan. Generally, the costs associated with mortgage refinancing are rolled into the loan, meaning they are added to the existing balance, increasing the loan amount.
Carefully review the estimated closing costs. If you decide to lock in the rate, the lender will send you a "good faith estimate" of your closing costs within three days. Go over the numbers carefully, and compare them to the ones that appear on the final settlement statement (the HUD-1) from your previous mortgage.
These days most people request a Good Faith Estimate (GFE), but have no clue what to look for on the GFE. Make sure you request a GFE that has ALL fees estimated and disclosed. This includes: origination points, processing, lender, appraisal, title, escrow... ALL FEES... especially the Yield Spread Premium or YSP.