UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FX/ooE7Ob9ikdHaU1YTNjc3mJKRTVskO/Gg1Ria7l0o=' 
WHERE 
  key_id = 'c6ad9d7b7a67fb8678475a1bb352608ca1d07688a1f76f4c7e561f8f477bd370' 
  AND (
    token = 'FX/ooE7Ob9ikdHaU1YTNjc3mJKRTVskO/Gg1Ria7l0o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023