UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VfMbfT6OHJ+PiULChP6Cm55VlG9nU7PUZOEu2/PscwU='
WHERE
key_id = '9f60bb57bdc02d5546ce039fdd6d0a26cb096658c295fbcd7515e34f1ddcd88e'
AND (
token = 'VfMbfT6OHJ+PiULChP6Cm55VlG9nU7PUZOEu2/PscwU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)