It should documented which one it is in the divorce settlement papers.
Both my partner and I have have a similar thing with our exes.
For me, the charge is fixed at the value at the time of the divorce as I was taking over paying the mortgage etc from then on in with no time limit on sale. For my Partner his is at the point of sale, as he is still paying towards the mortgage, as his children live in the house. A clause being added to his that the house be sold, or his name removed from the mortgage and the equity released to him on youngest turning 17 years old, which at the time was 10 years, with 2 years remaining.
Luckily relationship with his ex is now good and they are just starting to look into possibilities for 2 years time.