add exclusive lock for sqlite db