UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OrQ/zSJnq/FhevesofhKdIXIcdKZgwq7XBu2wBvpSB8='
WHERE
key_id = '2a2a1d3a40bf2085dffca54eff8760c9c920842ea8f2384eda11a016fe6974c5'
AND (
token = 'OrQ/zSJnq/FhevesofhKdIXIcdKZgwq7XBu2wBvpSB8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)