I think you need
brew upgrade && afplay /System/Library/Sounds/Submarine.aiff -v 10
then the afplay will run if the brew completes successfully.
As a note of explanation, you are asking the shell to determine if both statements ("brew" and "afplay") are true - it is therefore obliged to evaluate the "brew" statement fully (i.e. wait for it to finish) before executing the "afplay" in order to determine whether both statements are true.