You can disable ai.canSearch which will make sure it does not try to recalculate its path again, and then you can make it use a path that you give it using ai.SetPath.
Something like this:
RandomPath t = RandomPath.Construct (transform.position, 500000);
t.spread = 5000;
I recommend that you do not explicitly try to cancel whatever it is doing because then it will do nothing in the few frames that the path is being calculated.