SQLite ON CONFLICT query

Why not try your insert, catch the error if there is one since you have a unique constraint and do your update in there? You can follow this logic of this post