@bravokeyl that doesn't sound particularly scalable, can you provide some context? I suspect there's a superior tradeoff that trades storage space for speed
I don't see why you would need to loop through all registered users and not just whatever the current user is, or whatever the current ad is.
Looping through all registered users and updating their metadata to clear out a value sounds labor intensive. Maybe update/clear what you need via SQL. If you can find a way around updating a ton of users all at once that's probably your best route.
see Fuxias comment though, the cleanup would probably involve pulling in a set of users in batches of 30-50 and manually inspecting their meta in PHP to avoid searching
another option is to store each unlock/event with the same key, bundling in a time, then grabbing them when you check and checking each to see how many fall within a time period
that would mean no cron jobs, at the cost of extra rows
if strictness isn't a priority you could eliminate all the server side stuff by doing it client side