Sorry, I stopped using MySQL for anything like this a long time ago (I still do some basic content management stuff in it for fun) and switched over to pgsql a long time ago.
It's not hard to do by hand as long as you don't have to worry about the switch to daylight savings, just divide it by 60 to get minutes, 60 more to get hours, 24 to get days and so on. I.e. if you get back 12345 seconds, then you get 205.75 minutes. .75 minutes = 45 seconds, so that's 205 minutes and 45 seconds. To get the 45 seconds, we just multiply the part to the right of the decimial by 60, the number we divided by to get there.
next, we divied the integer portion we got back (i.e.the minutes) by the number of minutes in an hour. 205 divided by 60 = 3.4166667. Again, multiply the .4166667 part by 60 to get the number of minutes, the part to the left will be hours. If the integer portion is >=24 then we now need to divide by 24 in the same manner.
So, for 12345 seconds we get 3 hours, 25 minutes, and 45 seconds.