UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'QG/YVd7bcXGumbOeb7as0cL99+uEB38AcYf3pI4Lt5A=' 
WHERE 
  key_id = '0ce5abc55a067c558c8a27dd6c053e3f8bdd94a9bfdb737ba68aa4da201956cc' 
  AND (
    token = 'QG/YVd7bcXGumbOeb7as0cL99+uEB38AcYf3pI4Lt5A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031