I would recommend associating an expireary timestamp with each code so that when a player redeems a code you can check if the time that they attempted to redeem it is before the expireary time.
You will need to add a return clause in case your script is failing.
Unless these 250 players are all in the same server, I don’t see why your system breaks even with the datastore ratelimits. Could you specify what type of error you are getting?
Ideally you’d only need to save the player’s data when they leave.
You should define what you mean by “system broke”. We don’t know how your system works, so saying such phrase may lead to other developers misunderstanding the problem.