I performed a similar task recently using BAT for CCM and Bulk Edit for Unity. I wasn't migrating from 4 to 5 digits, though I was changing the dn range involving approximately 200 users. In the examples I'm change dn 4814 to dn 2214.
Here's an example of the file format for BAT. Use the Add Lines feature, but instead of specifying line 2 as the line being added, specify line 1 as shown below and reference the new 5 digit dn.
000D292969E4,1,2214,ServerRoom,,,,
To update the users in the directory, export a list of the existing users with the Export Users option. The format should look something like this:
Serverroom,,,,,000D292969E4,4814
Use the Update Users option after updating the DN's to reflect the new number. The resulting entry should look something like this, except with a 5 digit DN in your case:
Serverroom,,,,,000D292969E4,2214