UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xfx+r3Fzp3kPcP5/IxaeT3jVolNE08MHbehfU4oIKeI=' 
WHERE 
  key_id = '75c402472c7e8170289b447e43f183d2530c54cd706487885d10028d93f5f5ff' 
  AND (
    token = 'xfx+r3Fzp3kPcP5/IxaeT3jVolNE08MHbehfU4oIKeI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033