UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aCJdExvzRxPg+s3evrvbWQ8Lqvoou4kg0nyvhg0w5JE='
WHERE
key_id = '35fe086f5e84b8141308e2709c2501493c316723e443610f08c3e703cac69cd2'
AND (
token = 'aCJdExvzRxPg+s3evrvbWQ8Lqvoou4kg0nyvhg0w5JE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)