UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'i7kitzLvskfr0uJBE6eTdTlI5V3H7XUuPFleoJQEBoc='
WHERE
key_id = '1c5566c8adbb008d45415550c69894b6930b0d0784457c8395c21c48139e50af'
AND (
token = 'i7kitzLvskfr0uJBE6eTdTlI5V3H7XUuPFleoJQEBoc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)