The umask setting will last until your shell exits. If your umask statement is in a script, it will only take effect for the shell that script runs in and does not effect the calling shell. If you type it at a shell prompt, it will last until that shell exits.
You can test this by checking your umask value prior to running the script, running the script (with the umask statement in it) and checking your umask value again after the script. Any files created in the script will have the new umask value, but your umask at the shell prompt at the end is the same as before running the script.
At least, that's what happened in my bash shell just now...