The most likely scenario is that Messi will leave for free in the summer and Barca will have to pay every penny of his contract including loyalty bonuses.
I hope that happens (regardless of where he moves to). I do expect him to sign an extension and finish up there.