UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QPMC5SIAf9RCrM7kPLNXvhCZ0JUtUjSyqdzYLRCqIpE='
WHERE
key_id = '0cc77103a08c83fa9f7ad9cb0fb40790df185c0692b71506f66c7b0910ac9e0d'
AND (
token = 'QPMC5SIAf9RCrM7kPLNXvhCZ0JUtUjSyqdzYLRCqIpE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)