You could make sure you finish the game before your lantern dies.
You could buy some batteries in the 'all different' maze.
You could use the appropriate magic words. They will give your lamp a one-time boost good for several hundred moves.
Harnessing electricity is a kind of sorcery.