Using Moodle 1.21
I've seen this error 2x on our first course. The time it happened today I know exactly what I was doing and have a hunch as to what not to do now.
We ran a chat this morning with ~10 people and all seemed well except my connection was really slow at times so It's a local ISP issue. Few others in the chat had any problems except us on the US west coast so I figure one of the big pipes or possibly the latest sassy worm is taking its toll.
So, after the chat I am adding on new resources while other students are logged in doing work and reading. I get impatient because my computer seems to time out while waiting for a resource to add (an uplaoded file that I had already uploaded via FTP) so I click on Save again and it's the 2nd instance that locked the table. Instead of MYISAM, Myphpadmin list s the table as in use and noone can view the site because of the afforementioned error message.
A simple REPAIR TABLE mdl_course_sections fixed the problem and another backup ensures nothing lost.
Hope this helps someone in the future.