First, the market has responded well after bad years - certainly in the last few decades. So, if you are saying there is a 30% drop and it DOESN'T come back for some reason - I still don't think it's a good idea.
Let's say you have $300k in a 401k and a $100k mortgage. The "net" asset is ($300 - $100) $200,000.
To pay off the mortgage, you probably need to take out $200,000. Tax penalty of $20,000. Then all that income is piled on top of your other income and you're getting up to a pretty high rate. In this scenario, let's say 40% Fed and State combined. That's $80,000, for a total tax of $100,000.
So, now there is $100,000 left and it's enough to pay off the mortgage.
However it's now a "net" asset of $100,000, instead of $200,000. A loss of $100,000 in the transaction.
The positives - the mortgage is paid off. Some security today. And you avoiding interest payments in the future. Better monthly cash flow.
The negatives - a sacrifice of $200,000 invested in a tax deferred retirement plan. Less security at retirement. That $200,000 likely can't be replaced even with bigger monthly contributions. You could have avoided the penalty and paid the tax (usually) at a much lower rate.
Personally I don't think that's a good deal. And, I don't think the market will go down 30% and stay there.