If IDs are matching between the new optimized poses and nodes in the database, the "simpliest" way would be to update opt_ids and opt_poses fields in the
database directly. A python script with sqlite3 could be a way to implement this (this
script can be used to compress and uncompress the opt_poses blob).
If the modified database is used in localization mode, it should keep the modified poses.
cheers,
Mathieu