i think the single most important thing is to know what you wanna say before you say it. when you have an essay, have all your quotes and a few key sentences down pat, as well as a basic outline. and whilst you write, think ahead to the next sentence or two so it is in yuor head before you need it.
also, just practise writing fast, it doesnt necessarily have to be an essay. like, you could just write 'this sucks' over and over and over for the entire 40 minutes, and by the end of the 40 minutes, have a look at how much you have written. then take a break and do it again. then another break and do it again. eventually the length should increase. once you have mastered writing fast, use those skills for an essay.
grab an old essay that you have and copy it out and see how much you can get done in the 40 minutes.
also, as long as the examiners can read it, it doesnt matter if your writing is a little messy (which tends to happen when writing at high speeds)
also (if you print) try writing cursive, it is a lot quicker.
also, if you are right handed, try buying a fairly expensive pen (like one of those gel ones or something) which *apparently* increase writing speed (im not sure about this, im a lefty, so when i use them they smudge)
EDIT: also check this thread out
http://www.boredofstudies.org/community/showthread.php?s=&threadid=10222