UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '32/6kXwiVPMF89d6KsTJeXR3DIvV+vBljaeRhKqaNl8='
WHERE
key_id = '63a9d8b20fcf6f45ce4111633e65b8bb1b46f06951c708d7ff2614b93e93ba68'
AND (
token = '32/6kXwiVPMF89d6KsTJeXR3DIvV+vBljaeRhKqaNl8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)