+1  A: 

On the technical level, you could use table-locking (or row-locking) abilities of MySQL and would allow you to detect if someone is actually computing something for the table, but that would require much considerations like what happens if a process crash, etc.

On the practical level, though, I doubt you would want to do something like this. Operators like sum() or avg() in MySQL are already optimised for this need. If what you need to do is a sum over some columns of a table and get the answer in a table, you could use a view or create a temporary table (possible but slower). You should try not to create a table that contains statically a value that is dynamic on your system.

On a second note, be sure to use InnoDB tables on your MySQL instance, otherwise your system won't be fully ACID-compilant, signifying you won't get the atomicity nature you need.

Soravux
You can find information on views on this page : http://dev.mysql.com/tech-resources/articles/mysql-views.html
Soravux