While urbex is fun the thought of sleeping in an abandoned tunnel because of getting lost or access becoming locked is something I’ve definitely taken into consideration.
Options . .
. don’t explore abandoned tunnels (ugh)
. know for sure if access gets locked EVER
. take sufficient supplies to survive an indefinite amount of time underground
. make sure someone not on the expedition knows where you’ll be and will come get you out if you don’t report in by an agreed upon time