I think I have a solution for you.
First, I think your data is a bit incoherent. You have users checking out before checking in and users checking in twice.
If I’m right, you want a pair (USERID, Checkin Time) and the smallest Checkout time, if any, after that Checkin time.
With the correct data I tried this and it seems to work:
SELECT A.USERID, A.Checktime AS Checkin, MIN(B.Checktime) AS CheckOUT
FROM (SELECT USERID, Checktime, sensorid
FROM checkinout
WHERE sensorid = 'I') AS A
LEFT OUTER JOIN
(SELECT USERID, Checktime, sensorid
FROM checkinout AS checkinout_1
WHERE sensorid = '0') AS B
ON A.USERID = B.USERID AND B.Checktime > A.Checktime
GROUP BY A.USERID, A.Checktime
Don’t forget to mark as answered if it’s the case.