There is a nice article about that:
https://unixsheikh.com/articles/sqlite-the-only-database-you-will-ever-need-in-most-cases.html
With WAL mode it is easy to queue up writers. And since Mastodon is based on a job queue anyway, concurrent writes are not really an issue.