@KevinTheJedi
Thank you that seemed to fix that part.
I executed following queries
Backup table
CREATE TABLE ost_thread_entry_email_backup
SELECT *
FROM
ost_thread_entry_email
Clean up duplicates
DELETE t1 FROM ost_thread_entry_email t1
INNER JOIN ost_thread_entry_email t2
WHERE
t1.id < t2.id AND
t1.thread_entry_id = t2.thread_entry_id;
I will check why I was not able to delete tickets. Maybe this was fixed with this fix as well.