You might want to upgrade to at least 7.23.2. See the release notes for Mx7.23:
We fixed a unique constraint violation because of duplicate keys, because of incorrect client/server communication about objects when microflows are running in the background. (Ticket 78210, 78407, 78478, 78588, 78688, 79489)
Regards,
Ronald
You are using the internal HSQL database which can become corrupted, try using postgres, this will probably solve your issue.
Other option is to remove the contents of the deployment folder and redeploy, this will delete all your app data (NOT the model itself ;))