You can never be too careful in choosing friends.

Literal

Friend [object-を] choose time [at-には] caution [object-を] do-and overdoing [topic-は] is-not.

A bookish phrasing of the 'can't be too careful' proverb. The logic is explicit: 注意をして (exercise caution) + しすぎることはない (there is no overdoing). The ときには topicalizes the friend-choosing time as the frame within which the caution applies.