UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uMr7G1ni7ChgFr/QSJb4w/g4kdB73Goinf3xHb0yPXk=' 
WHERE 
  key_id = '8ab3c64864dbfd06d06a9cecf3a83f953f58b410c83cffa5b5a852dbb0d8e624' 
  AND (
    token = 'uMr7G1ni7ChgFr/QSJb4w/g4kdB73Goinf3xHb0yPXk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020