UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AdxHn5wcdVR7WXAwqqnUGgrcKIBRyJfNhc1p2WVwbe4='
WHERE
key_id = '98b2b0fd620e739553a1ae74fc88c2632d85f377f68c04c21fe444850c6fdd3e'
AND (
token = 'AdxHn5wcdVR7WXAwqqnUGgrcKIBRyJfNhc1p2WVwbe4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)