Most financial experts recommend that you aim to be debt-free by the time you retire. This means that you should try to pay off all of your debts, including your mortgage, before you reach retirement age. So, you should aim to be debt-free by the time you're 65 years old.
And, if you're unable to achieve this, don't worry. There are still plenty of options available to you, such as debt consolidation or refinancing.