storage: use upsert in store_instance