Messi can play well till his fourties if he want but I am not sure he will play well in Premier League after his 35s.
I doubt if he will play till forties. 38 may be the last age for him to play in a football match. But it is purely our speculation, we don't know what he already plans for his career in the old age. But I disagree to underestimate him to play in Premier League. Never judge that he won't play well till he tries to play there for one season at least.
If he won't get serious injuries and has to end his career when he won't want to stop. He can play till his fourties or even fifties like Kazu Miura. It depends on future injuries, his joy in playing football (that I think Messi is abundant with), and which league he will play at his last seasons.
One of greatest players in history can play at any league (except top leagues in Europe) at end of career. Newell's Old Boys is not bad for Messi at his fourties.
https://www.bbc.com/news/world-asia-53977255https://en.wikipedia.org/wiki/Kazuyoshi_Miura