As the other comment said: it's impossible to collect all the bolts before the walls close in on you
it is you just have to collect them in a sequence from right to left fast >:)