UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4k/Q6F/uhaHQ+tNv6v5SRFxHzQdo/ofdiKcASX3FqCU='
WHERE
key_id = '8bb7a44d7cb2792ae1cf64993db0db789abb9124dbe374a790148a30a48c1f39'
AND (
token = '4k/Q6F/uhaHQ+tNv6v5SRFxHzQdo/ofdiKcASX3FqCU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)