The /ban -u has a -k switch to combine the kick with the ban, however the kick only works if you give it a nick+mask instead of giving only the address. The available masks are shown with /help $mask but none of them is nick!*@* with the closest available being mask 9 as nick!*@*.host

To use this with mask 9, change from:
.timerscriptname0K $+ $nick 1 40 /kick $chan $nick You were warned to change your nickname, now you are expelled
to
.timerscriptname0K $+ $nick 1 40 /ban -ku60 $chan $nick 9 You were warned to change your nickname, now you are expelled

The 60 is seconds, so if you want to ban 5 minutes that is 60*5=300 seconds.
Note that the unban after 60 seconds is a mIRC timer that waits 60 seconds then sends a command to remove the ban. At 60 seconds in the future, if you are not in the channel or do not have @ status to remove bans, then the ban is not removed.

Also, the server has a limit to how many bans they will hold for a channel, and the ban fails if that list is full.

--

If you still want to have the ban use nick!*@* instead of nick!*@*.host you would need to have 2 timers, with 1 timer doing the kick in 40 seconds and the other timer doing the ban in 40 seconds. You would then need to clear both timers in the place where you now clear just the 1 timer.