UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fwPNfFk6g7sVrbxtj8C9rMOVBfXuq4NVguae3CEE5KY='
WHERE
key_id = '3cb2febefc0abda78ab6fa0df44bfd1617fd76508ed41d152d1dc636b26d5a5e'
AND (
token = 'fwPNfFk6g7sVrbxtj8C9rMOVBfXuq4NVguae3CEE5KY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)