Pull your credit report from the bureaus and review it for any negative items (late pays, collections etc) and inaccurate detail. Try to dispute negative items and remove them from the report. If required pay off any unpaid debt. Otherwise, you won't get a low rate and may not even qualify. Of course there are lenders in the subprime market who may offer you a bad credit refinance loan, but it's better to avoid them as they'll possible charge higher rates and fees.
Refinancing is not the only way to decrease the term of your mortgage. By paying a little extra on principal each month, you will pay off the loan sooner and reduce the term of your loan. For example, adding $50 each month to your principal payment on the 30-year loan above reduces the term by 3 years and saves you more than $27,000 in interest costs.
Don't rely on published rates. "No one's going to advertise their worst product," says Keith T. Gumbinger of HSH Associates, a Butler, NJ, firm that tracks mortgage rates. "They advertise the best possible rate, which probably gets offered to only the top 10 percent of applicants."
If there are only a few years left on your current loan, it's no use refinancing with a long term loan. You may need extra cash but with a long term loan, you'll end up paying more for the entire loan term.