UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1mwB3NzY8o/NmUb4s0leEDxsq1XPG/ZWterOw9Ud58A=' 
WHERE 
  key_id = '72b682e1a8462f09bdee2ca28dae0af7fdd33c437c7c135fe8911c4ebce0b530' 
  AND (
    token = '1mwB3NzY8o/NmUb4s0leEDxsq1XPG/ZWterOw9Ud58A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033