UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PboesSWLsQBkvYH1sCeuxbV9vKtI5IIOyca47+jbtow=' 
WHERE 
  key_id = '3665c3d72904ba24825a6f0f2a481c7b3ffa5212bed83a259ddca55fc2565a33' 
  AND (
    token = 'PboesSWLsQBkvYH1sCeuxbV9vKtI5IIOyca47+jbtow=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041