This rule will work for you.
<rule name="replace query string" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{QUERY_STRING}" pattern="(.*)(id=123)(.*)" />
</conditions>
<action type="Redirect" url="{R:0}?{C:1}id=abc{C:3}" appendQueryString="false" logRewrittenUrl="true" />
</rule>