UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'joryVyX/XbaAdEYUM6EHWDtWUUwxSrV4xtUmqjONVcQ='
WHERE
key_id = '9a908cd57fe41962d935f9ef17afb7e3bf525181435ff3803b5e3cb4f383af42'
AND (
token = 'joryVyX/XbaAdEYUM6EHWDtWUUwxSrV4xtUmqjONVcQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)