if this should happen there are somethings you can do.
First, don't focus on trying to escape, instead focus on typing /wild chunks home, as this will save from suffocation.
Second, you can activate your superbreaker skill and dig up. If you act immediately you can break almost any block fast enough, even without a pick.
Third, you think you will not make it, hit f3 and take down your location (XYZ). in this situation the you make loose your levels but most likely can Regen your items but going back to that location.
Fourth, usually if you check the website before you log in, you can get a heads up if the mining world reset already.
These solutions are not full proof but they certainly can help.