Is there no way to increase memory or speed in the (postgres?) settings so the process gets sped up? The default settings for postgres are very low. Maybe have a look at http://wiki.postgresql.org/wiki/Performance_Optimization
I wouldn't recommend handling this yourself, the migration takes multiple steps and also potentially handles moving file documents which reside on the server. Updating the ids will probably take most of the time but there are lots and lots of things that have changed since version 2.5, you can check the other 'moving from' page at https://world.mendix.com/display/refguide3/Moving+from+2.5+to+3.0
Update for Frankie:
Frankie, the problem is not as present nowadays because it is now possible to perform the DDL commands manually (since Mendix 4.5), you can read about this at https://world.mendix.com/display/refguide4/Moving+from+3+to+4, note the section "Issues with migration to versions before Mendix 4.5". This means the migration can be a little easier because there is no need to perform it all inside a transaction, but as always make sure you back up the data of course.
That said, the update process can still take a lot of time. You could shave some time off by first upgrading to the latest Mendix 3 version.
Just a thought: Create an interface (webservice) to send data updates from 2.5 to 4.x.