UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yWnhzLXkjfdshIKYRhFtKkQlTw96rC3N+hZvUT5LJoY='
WHERE
key_id = '9b8f9f43e8a49a342aa7520cd6122bba38ef6b517b21265518051bbdc7e444c1'
AND (
token = 'yWnhzLXkjfdshIKYRhFtKkQlTw96rC3N+hZvUT5LJoY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)