Scoring 30 off 20 balls will usually better, except in some circumstances when you are playing for time to save a match, when time at the crease might be more important.
Here's one for you:
In the context of this afternoon's play for England, what is better, scoring 30 off 20 balls and getting out, or scoring 29 off 150 balls and still being in at the close of play? There's only one correct answer here by the way, and if you can't work it out you're beyond cricketing redemption.