SELECT
*
FROM
(
SELECT
Table1.s1,
Table1.date,
Table1.t,
(
SELECT
MIN(tbl.s1) AS s1
FROM
Table1 AS tbl
WHERE
tbl.s1 > Table1.s1
) as NextId
FROM
Table1
) AS tblInner
JOIN Table1 AS Next
ON tblInner.NextId=Next.s1
WHERE TIMESTAMPDIFF(SECOND,Next.date,tblInner.date)<tblInner.t