CREATE OR REPLACE PROCEDURE 
    CheckOnline( IN Token VARCHAR(64) )
BEGIN
    SELECT
        user_id
    FROM
        online
    WHERE
        hash_string = Token
    AND
        latest_login > DATE_SUB( NOW(), INTERVAL 1 MONTH )
    LIMIT 
        1
    ;
END



