i don't know how it is going to work so i am going to make a script to run through the database and basically do the following! This is an example for anyone else who wants to know!
mysql> select id from agent where name = "example agent";
+-----+
| id |
+-----+
| 894 |
+-----+
1 row in set (0.00 sec)
mysql> select id from broker where name = "example broker";
+----+
| id |
+----+
| 2 |
+----+
1 row in set (0.00 sec)
mysql> update agent set fk_bid = 2 where id = 894;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql>