There is no set rule!
That's between the club, player and player's agent on the moment of a contract review or renewal depending what the circumstances are. Sometimes clauses are lowered when a player renews so as to lower his wages. But then a contract is reviewed or renewed, the normal thing is for the player to subsequently earn more and the club get their part with a much higher buy-out clause.
In the case of Marco Asensio, he will no doubt now have a superstar contract this time around and get the top bracket wages which will mean a massive buy-out clause like the one being speculated on.
What's for sure is that the bigger clubs in La Liga want to stop this buy-out clause situation as their defence mechanism with a negotiation only rule is much more adequate. For medium to especially smaller clubs, a buy-out clause sometimes makes sure they get top dollar for players that can be poached by bigger clubs. The player will put pressure on the club to move and that can cause chaos in the club.