You just need a variable to store the old speed (like Scorpyo posted) and an on/off switch. When you turn the character you save the old speed and turn on the switch. Right before it checks for KEYSTATE(30) and KEYSTATE(32) it checks to see if the switch is on, resets it back to the old speed, and turns off the switch. If the player is still hitting the turn keys it'll repeat the process so it'll always keep the same old speed till the user lets go of the key.
Replace the two lines for turning with this:
` Check if the the turning switch is on
if Turning=1
` Reset speed to old speed
SpdBrkt=OldSpd
` Turn off turning switch
Turning=0
endif
` a
if keystate(30)=1
yrotate object 200,wrapvalue(object angle y(200) - 0.4)
` Save the old speed
OldSpd=SpdBrkt
` Change the speed
SpdBrkt=5
` Turn on the Turning switch
Turning=1
endif
` d
if keystate(32)=1 and Turning=0
yrotate object 200,wrapvalue(object angle y(200) + 0.4)
` Save the old speed
OldSpd=SpdBrkt
` Change the speed
SpdBrkt=5
` Turn on the Turning switch
Turning=1
endif
Edit: I started this as untested code but decided to test it out anyway. I noticed that the way I had it at first (without "and Turning=0" on the check for the D key) it would make OldSpd equal 5 if the A key was also pressed... which I'm sure you didn't want to happen so I added the check for Turning at zero.