Based on the results of the corrected query, if I now delete those citations on a fresh copy of the OJS 3.1.0-0 database by running:
DELETE FROM citations WHERE citation_id IN (14,15,16,17,18,19,20,21,22,23,24,25,26,27,799,800,2948,2947,2946,2945,2944,801,802,803,804,805,959,960,961,962,963);
Query OK, 31 rows affected (0.004 sec)
the upgrade then works without errors. Thanks again