What worked for me - no restart required - after reading all these posts...
1. Disable Virusbarrier X6 (Launch X6, go to preferences > advanced tab, and switch the big slider to 'off'.
2. Launch the Console.app (in Applications > Utilities)
3. Once Console launches, go to View > Clear display (this clears the screen, gets rid of the clutter)
4. Launch the App Store, and try to buy Mountain Lion - you'll get the error message as before.
5. Quit the App Store.
6. Go back to Console - and open the folders of information displayed in the viewer window.
7. In amongst all the gobbledegook text on screen is a parth to the var/folders/ directory. The folder you are looking for will have a name like d3 or zz (it differs on each machine).
8. Once you know the name of the problem folder - go to the Finder, and choose 'Go to Folder' (Cmd-Shif-G)
9. Type in /var/folders in the Go To Folder dialog and click 'Go'
10. In the window that appears, you should see the folder you're looking for, and maybe 1 or 2 others.
11. Drag the problematic folder out on to the desktop (you may need to authenticate to do this) and save this folder in a new folder - 'old var file' or whatever.
12. Select the problematic folder from it's original window, and delete it - Cmd-Delete, and it disappears (but you have the backup copy, just in case. Apparently a new folder will automatically be re-created (by FInder or App Store) - so don't fret too much about removing this folder. And you can always copy your 'backup' back here, if there's a problem.
13. Re-launch the App Store, and try purchasing Mountain Lion. For me - this now worked!
The above worked on a mid-2009 MacBook Pro. I tried a few other suggestions - e.g. re-installing the 10.7.4 combo update but it didn't make a difference. It certainly looks like VirusBarrier X6 is the culprit.
I am currently downloading Mountain Lion - but I did update X6 beforehand to the latest verison, which is supposedly 'Mountain Lion ready'. Once downloaded and installed, I'll go back to VirusBarrier and switch it back on.
Good luck folks!