Thanks Michael for response. We thought more of having a database of generated codes pending until someone claims the badge using the code in the database.
In this way it would be possible to link the code not to the time but to the database.
Changing the code manually possible however the question remains about the possibility to game the system:)