UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ka+u8UaEUfxnbgTYc6hb6eWAILumdJovFUzCBghpbKg='
WHERE
key_id = 'c93bc7f80f36616d1f35e000c16c3ff8637a7aaa2942cc5bd035345a6a209a50'
AND (
token = 'ka+u8UaEUfxnbgTYc6hb6eWAILumdJovFUzCBghpbKg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)