Already considered and made for
http://forum.mikrotik.com/t/dual-wan-failover-script-ping-command/150516/8
:global newIP [:tostr $"local-address"]
/ip fire conn
:foreach idc in=[find where timeout>60 and (!(reply-dst-address~$newIP))] do={
remove [find where .id=$idc]
}
But with too few details, as usual, I cannot adapt it to this user request without any data…
In this case, if IP obtained are the same, do nothing, if IP obtained is different, drop all “invalid” tracked connection (that have timeout major to 60 seconds)