On the Printers settings tab, in the Validity of temporary cards field, you can set the duration of the temporary cards validity in hours. The default value is 24 hours.

Printers settings tab