EXPIREAT
EXPIREAT is a Redis command that sets an expiration time for a key as an exact Unix timestamp in seconds since the epoch. Unlike EXPIRE, which specifies a time-to-live relative to the current moment, EXPIREAT fixes the expiry at a specific moment in time. When the timestamp is reached, Redis automatically deletes the key.
Syntax: EXPIREAT key timestamp
Return value: 1 if the timeout was set; 0 if the key does not exist.
If the timestamp is in the past, the key is expired immediately. If the key already has
EXPIREAT has related commands for working with expirations. PEXPIREAT uses timestamps in milliseconds. There is also
Persistence and behavior: Expiry information is persisted alongside the key in Redis’s data persistence mechanisms (RDB
Example: EXPIREAT session:token 1735675200
This sets the expiry of the key to the specified Unix timestamp. If the key exists, Redis