UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xnOfqB4qZhhjsdXQOAjw9YL4l5QDE9XSp0QBxSNI66Q='
WHERE
key_id = '43b7548e3e7e718d374fe057d865073ed676ae211febfc1b497eda5dbc71677e'
AND (
token = 'xnOfqB4qZhhjsdXQOAjw9YL4l5QDE9XSp0QBxSNI66Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)