UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0Wx1dRuozR2Nw7Vby3Na0l79aCfTJR/2hGVFs0/aiPs=' 
WHERE 
  key_id = '83198c052d358b39edb62e97845a063774a8ba6d592f5d2e65c2e97f510fbc54' 
  AND (
    token = '0Wx1dRuozR2Nw7Vby3Na0l79aCfTJR/2hGVFs0/aiPs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031