It would be helpful to know the trim level of your car, Piri, as the trade-in price range from the ST 4X4 to the top-of-the-range Ti could be from around $15,000 up to $22,000. Also, without seeing the car in the flesh, it’s very difficult to make such a call on a car’s trade-in value. That said, at 140,000km, your car has pretty high kilometres for its age and that would play against it as a trade-in.
In the end, it might simply be the smart thing to do and just drive it till it falls apart, but you should know that these X-Trails are not the cheapest vehicles to maintain and keep running in perfect condition. The way Nissan laid out the driveline, in particular, sometimes means that what should be a little job is actually quite a big one. Bigger jobs mean more hours and, in a mechanical workshop, time is definitely money.