The total number of beats in the song are determined by the length of the song and the tempo. If the tempo is slowed down, the song will play longer.
Beats = tempo (times) time
Beats = 40 (b.p.m.) times 4 (min)
= 160 beats.
Now, we will use the adjusted tempo:
Beats = tempo (times) time
160 = 30 (b.p.m.) times t (min)
t = 160 / 30
t = 5 1/3 minutes.
The song will last 5 1/3 min with tempo of 30 (b.p.m.).