This can be achived using many uses. I think you can try this approach:
I would suggest not to try any approach where you are manually acquiring the locks until you find a better way(There is actually a machanism called nested transactions which will do the job, but i don't think that concept needs to be used here, in fact above approach is simple and you can implemnt in less time).
Its good requirement for specific kind of application. This can be suggested as platform enhancment.