UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'C/Nob25C0QVpENOqg4B7uKe9ANRnYbbVXlq/t7MDHBk='
WHERE
key_id = '0454c82a63893953c7c32a96f8dabf49706eee44aaf827d657681846a51d5d1f'
AND (
token = 'C/Nob25C0QVpENOqg4B7uKe9ANRnYbbVXlq/t7MDHBk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)