safer record update code
remove deprecated line
only check that state is not pending
Merge pull request #395 from modilabs/agg-locks-390

safer record update code, related to #390