That code for your key presses only works while the player is touching the powerup.
What you want to do is set up a "SpeedPowerup" Boolean in your motion behavior that is checked whenever a key is pressed. If it is true, you set the speed to the higher value. If it's false you use the normal, lower value.
Then, just change the Boolean to True when you touch the powerup. If it's a temporary powerup, also start a timed task to set it back to False after a few seconds.