feat(db): Add lock on savepoint (fixes #5206, #5208)