How to convert time in seconds to HH:MM:SS format in MySQL?
You can use MySQL function SEC_TO_TIME().
Example:
SELECT SEC_TO_TIME(2378);
Output is:
00:39:38
So in your case:
SELECT SEC_TO_TIME(test_duration) as `Time` FORM YOUR_TABLE;
Do you store the time in Unixtime (Unix seconds?). If so, use:
FROM_UNIXTIME(unix_timestamp, '%h:%i:%s')