Transaction (BEGIN IMMEDIATE)
Also written: BEGIN IMMEDIATE, SQLite transaction
A SQLite transaction that blocks other writers until it ends, so the version check and the write happen as one step. Without it, another agent could write between the check and the save.