I think the basic question you're asking is whether you'd be better off putting the $20K into an IRA or similar investment, or if your best bet is to pay down your mortgage. The answer is...that depends.
What you didn't share is what your mortgage balance is so that we can understand how using that money to pay down the mortgage would affect you. The lower your remaining balance on the mortgage, the more impact paying it down will affect your long-term finances. For example, if your remaining principal balance is more than $200k, paying down $20k in principal will not have as significant an effect as if you only have $100k principal balance and were paying down $20k of that.
To me, one option is to put the $20k toward mortgage principal, then perhaps do a refinance on your remaining mortgage with the goal of getting a better interest rate. This would double the benefit to you. First, your mortgage payment would be lower by virtue of a lower principal balance (assuming you keep the same term period in your refinanced mortgage as you have now. In other words, if you have a 15-year now, your new mortgage should be 15 years also to see the best effect on your payment). Further, if you can obtain a lower interest rate on the new loan, now you have the dual benefit of a lower principal balance to pay down plus the reduced interest cost on that principal balance. This would put money into your pocket immediately, which I think is part of your goal, although the question does hinge on what you'd pay in points and fees for a refinance.
You can invest, but with that comes risk, and right now may not be the ideal time to enter the markets given all of the uncertainties with the "Brexit" issue. By paying down your mortgage principal, even if you do nothing else, you can save yourself considerable interest in the long term which might be more beneficial than the return you'd get from the markets or an IRA at this point.
I hope this helps.