It's very strange you have so much double workelement

I never faced this on workelement (had it once on planningelement, fixed for long), and could not find a way to get this strange behavior.
Do you have any idea of how you could have got it ?
Anyway, you'll have do delete the extra line.
First display all :
select * from workelement where refType='Ticket' and refIdin(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 29, 31, 39, 43, 45, 47, 48, 50, 51, 52, 53, 57, 61, 62);
Please report result here. There may be some hint on how it happend.
Then delete some line so that there in no dupplicate for reftType / refId.