I think I understand about half of what you're trying to do, but I may have gotten the wrong end of the stick, so forgive me if I'm way off the mark 🙂
You want to extract all of the categories in your bkup_tbl and create them in your real_tbl?
First off, do a "select distinct" on your bkup_tbl to get a list containing all the categories (but listing each only once).
You then need to explode the categories value using the pipe "|" as delimiter. You now have an array of three categories eg ("ThinkGeek", "Pens", "Laser").
Check your table to see if you already have a record with a cat name of "ThinkGeek", if so, note the cat_id, otherwise insert the record (with a "father_id" of zero) and note the assigned cat_id.
Now move on to the second element of the array, "Pens"...
Check your table to see if you already have a record with a cat name of "Pens", if so, note the cat_id, otherwise insert the record (with a "father_id" of teh cat_id of the "ThinkGeek" record) and note the assigned cat_id.
... repeat this for each element of your array
... repeat this for every row returned.
How does that sound?