This does not prevent duplicate entry
Anyone can photograph a ticket and show the photo, and the code cannot tell the tenth scan from the first. For a door that has to be controlled, the reference in the code needs to be checked against a list your staff hold — a spreadsheet on a tablet is enough for a hundred people. Anything larger belongs in a ticketing system that issues and validates its own codes.