UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zkimEEjmeSXEbO5YhXQFoExqixosF4c1o8Q35hUQF0M=' 
WHERE 
  key_id = '934e6ce19e5cf690f4fa478af67a1e9435b2f041e0ac4f1b29ec5baf0569241d' 
  AND (
    token = 'zkimEEjmeSXEbO5YhXQFoExqixosF4c1o8Q35hUQF0M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027