Two in five new mortgages have terms that will see homeowners still making payments in retirement.