How to update path alias using MySQL command line
I don't think you will have much success using mysql, the quickest way is likely to write a script that bootstraps drupal, loads each node and then saves the node, I think this should update the aliases.