It's more simple to just use windows network zones so it automatically uses a static IP for only your router, or give your computer a WINS name and get kodi to use the name not the IP.
grep smb /home/osmc/.kodi/userdata/sources.xml
But yes you can write a root script to connect by mac address:
IP=$(nmap -p 445 192.168.0.0/24 | grep -B 4 B8:27:EB:9E:87:2A | grep "report for" | perl -pe 's/.* //g')
sed 's/(smb:\/\/)[^\/]+(\/)/$1'$IP'$2/' /home/osmc/.kodi/userdata/sources.xml
Then have it run from crontab or on command from the Kodi Advanced Launcher
Setting up a DNS server is another option but more complicated.