select id from sessions where expires <= NOW() or expires is null