ntozier I created a user and wrote a query as following:
UPDATE ost_ticket SET user_id='513' WHERE user_id IN ('269','300')
513 is the new user and 269,300, etc. are the old users I want to remove.
This changed ownership of tickets to the new user and after this I removed the old users manually.
This fixed my issue.