UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZyHz26qCphfdze4sJrlt5lyMJnQU8fMk0IZWNlriE/Q='
WHERE
key_id = '0ff1abd6419ffcce462b192f0c4960207a40a6b833b3b05aec038c7c138581a0'
AND (
token = 'ZyHz26qCphfdze4sJrlt5lyMJnQU8fMk0IZWNlriE/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)