UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'houiXQAFb04oNrzzR4b/Qy5qwvmjSWKtJaVqdQDbl7Q='
WHERE
key_id = '9068ba2c1cb550a86e673b2a71016efe7f151fcce404d66067951c6ca2b8756f'
AND (
token = 'houiXQAFb04oNrzzR4b/Qy5qwvmjSWKtJaVqdQDbl7Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)