First what does this base look like?
Taking earth as an analogue lava tubes are about 1-15 metres below the surface. Lets presume the base was the safest possible at 15 metres down.
Now Mars One are projecting a living space of a 1000 square metres for their habitat. So how about a roughly straight section of tube 10 metres wide and 100 metres long.
Danger list:
- Gamma Radiation
- Extreme Heat/Cold
- Space Vacuum
- Asteroids
- The Sun
- Humans
Gamma Radiation
Radiation is all around us, but Gamma Radiation is some of the most high energy. It has a nasty effect on electronics particularly computers. While it may not destroy the computers it will corrupt their running software, which might cause an automated self-destruct sequence to run, or the generators to run too high, etc...
Fortunately a few centimtres of lead or a metre of concrete will save the day. That 15 metres of rock should do the trick.
Also keep explosive things away from the habitat itself, and pipe/cable them.
Extreme Heat/Cold
Being 15metres below the ground this base won't be exposed to the extremes at the surface. Now 1 metre below the surface has a temperature of roughly -21.6 centigrade. At 15 metres we are talking somewhere between -20 and -40. Our equipment regularly survives these temperatures in the arctic/antarctic.
Given that there would be little fluctuation once the heating system failed, this would be unlikely to damage anything in the base. (Aside from initial cooling).
Space Vacuum
Worthy of note, but mostly harmless.
Space being a vacuum means that it has nothing to affect the moon base. The real problem in this scenario is in fact self-harm. The moon base being pressurised could explosively depressurise. Roughly 3000 cubic metres of air (3 metres high by the 1000 metre squared living space) would attempt to vent out one end. The air reserves and any liquid water might decide to do the same thing. Water can boil in space due to lack of air pressure.
As bad as this might sound, structurally speaking the base would be mostly fine. There would be a much larger hole in the habitat were it depressurised, and some amount of mess caused by the rapid air movement. Some things would likely have exploded due to air trapped inside them during manufacture, such as wires, batteries, and computer devices. Some of these may have survived if the government thought to manufacture space worthy versions, instead of using cheaper components presuming the habitat would protect them.
Over time the moon base will leak atmosphere, reducing the amount within. What will cause explosive depressurisation is if a hole forms.
This could be because of some external damage, it is after all in an underground tube, a disturbance could cause rock to hit the habitat and make the hole.
Alternately the most likely culprit is some chemical reaction happening within the habitat. This could be something like acid or a solvent eating through its container, and then affecting the habitat. The more likely is the oxygen in the atmosphere. It loves to react with just about everything. Fortunately your astronaut already dealt with this issue by breathing it in and leaving it as relatively inert carbon dioxide.
Asteriods
The moon gets hit by a lot of rocks, and it has no atmosphere to dissolve them before they hit.
There are a lot of different sized impact craters. Depending on how you try to count it we get around 20 million above the size of 1 km. This is pretty worrying for the moon base because even if the crater is only 2 or 3 metres deep the shockwave could collapse/damage the tunnel, and NASA is worried about that precedent too. Turns out the moons is being hit a lot and often.
If we do some rough calculations. A musketball impact roughly every 1380 years for an area of 752 square meters. That is a direct hit to this moon base, and quite likely catastrophic.
The Sun
... will swallow the earth, or come pretty close in about 7.6 Billion years.
So either the Earth (and its moon) are now parts of the Sun, or the sun is sitting so close that the moons surface starts to liquefy/erode.
Humans
Somewhere between now and the sun killing us all. Humans will want to move.
If we are tardy, the moon is a great mining opportunity for making our trans-solar space ship. I doubt the base would be preserved.
If we are enthusiastic, the Moon will be mined, settled, and used for space ship construction in the not so distant future. It is hard to determine how quickly we would find and/or destroy this base. Most human settlement occurs above the top 10 metres of ground, and it would take numerous generations to get a full population going, presuming that 1/6g is habitable by reproducing humans. Then again, presumably a 15 metre deep lava tube might make a very convenient location to setup, and be found if not immediately then shortly after.
Long answer Short
You have till the first human settlements on the moon, assuming they look for magma tubes too, because they are poorly funded/have to look for cost efficiencies.
Otherwise you probably have 1380 years, maybe a bit more if the site is luckier than expected, or the humans install an atmosphere/laser defense system.
Otherwise you have till the humans need to strip mine/convert the moon sometime later.
7.6 Billion years is the cap, excepting the serious good luck to be missed by those who fly the moon off into deep space.