You can make the entire value a NAnt property
<property name="db.string" value="User Id=${myID};Password=${myPW};Data Source=${MyDataSource}" />
Then use the xmlpoke
command, something like:
<xmlpoke file="${YourFilePath}\MyConfig.config" xpath="//Zones/database" value="${db.string}" />
Once it locates that node, it will update the value you specified in the property. NOTE: Not tested.