UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TsuGsPMG+CqnbA0cUVbNrcKQQGyWbFzGb8uaqa6AwWc='
WHERE
key_id = '73041bffea57d3718394bb2c62a291e780cd348c35bc8e7f1838d37160c099a4'
AND (
token = 'TsuGsPMG+CqnbA0cUVbNrcKQQGyWbFzGb8uaqa6AwWc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)