wrap multistep datastore call in synchronized block

This makes the series of calls act as though it were one call, better emulating the action that would take place in the real datastore.