I've been trying to recreate this, feedback would be immensely helpful in ironing out any variations on bugs.
To find posts with duplicate likes you'd want to run the query:
COUNT(`POST_ID`) > 1
AND COUNT(`USER_ID`) > 1;
Then to remove those likes you'd want to:
Where the postidnumber and useridnumber would be from the previous query.
ubbt_ in both queries would be whatever your database prefix is set to, default being ubbt_