Вы можете попробовать это:
Declare @time varchar(50)= '05:15:40'
select Sum(Left(@time,2) * 3600 + substring(@time, 4,2) * 60 + substring(@time, 7,2))
as seconds
ИЛИ
Declare @time varchar(50)= '05:15:40'
SELECT seconds = DATEPART(SECOND, @time) + 60 * DATEPART(MINUTE, @time) +
3600 * DATEPART(HOUR, @time)