Seems simple enough, assuming you've used sensible data-types for your columns:
DECLARE @Now datetime2(0) = GetDate();
DECLARE @MinDate datetime2(0) = DateAdd(day, -1, @Now);
SELECT
CardNumber,
Timestamp
FROM
YourTable As I
WHERE
I.InOut = 'in'
And
I.Timestamp >= @MinDate
And
Not Exists
(
SELECT 1
FROM YourTable As O
WHERE O.CardNumber = I.CardNumber
And O.InOut = 'out'
And O.Timestamp >= I.Timestamp
)
;
The only complication will be if your system allows an "in" and "out" at the same time for the same card number. If so, does that count as an "out" followed by an "in", or an "in" followed by an "out"?