The answer to your question depends on how much risk you are willing to take. If you are not willing to accept a capital loss, you need to consider leaving the money in a cash environment and accept that over the course of time, inflation may eat away at its purchasing power.
The alternative is to take some investment risk in the hope of at least keeping pace with inflation but in the knowledge that you will experience some ups and downs along the way.
Remember that you each have a tax-free personal allowance for income tax purposes. In 2014/15, it is £10,000 for the under 65s and £10,500 for those aged 65 to 74.
Depending on your state pension income, while some of the £40,000 capital remains in a taxable environment, you should decide whether it makes a difference from an income tax perspective whose name it is in - it may make sense for a lower-rate payer to hold the money.
The best savings accounts fluctuate frequently, so go to moneywise.co.uk/compare and look at the comparison tables.