Added coarse locking to sqlite store