UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e+YDLJKh/ZzFRdV1kfH8iOOhDZcWmfT3guWRgFGzX14='
WHERE
key_id = '3fe1fb4e6eba608d3b5e863d29b45b8ab925420e9f75310da68076b4cdf7bb8c'
AND (
token = 'e+YDLJKh/ZzFRdV1kfH8iOOhDZcWmfT3guWRgFGzX14='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)