UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AjEf1uT6k7RVrKf5l/oki72sAW+F4wwsvmawOrmoW/M='
WHERE
key_id = 'f0dc83cb4fe722096bfc57bb4a66b5d5c55914bdc64e2bcece6d5ac25a19f6e6'
AND (
token = 'AjEf1uT6k7RVrKf5l/oki72sAW+F4wwsvmawOrmoW/M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)