UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4G6+Cnje2c/SrbAQUgOaJ2CDyjn/pbZ/OaN5FUThPo0='
WHERE
key_id = '97b3339cd71572fd9c158ff0cdf1e1beb09d6e99501c2af6eacc0eeec5edd9ee'
AND (
token = '4G6+Cnje2c/SrbAQUgOaJ2CDyjn/pbZ/OaN5FUThPo0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)