Here's the answer:
“働くときは働く、遊ぶときは遊ぶ”
(hataraku toki wa hataraku, asobu toki wa asobu)
Watch a real native speaker say it:
Here's how it sounds in a textbook:
Fun fact: the hundreds of thousands of people learning Japanese with Memrise get this phrase correct 92.68% of the time!