It depends on
- where you are
- where you want to go
But before that, keep in mind that check-in closes on average 30-40 minutes prior to the flight departure, luggage drop-off one hour before and security will take, in the best-case scenario, 15 minutes. (Although 30-40 is more likely.) You simply can't go through security before you board your flight!
So, if you are lucky enough that there is a flight departing within the next hour which isn't fully booked and you are not checking any luggage in and the security lane doesn't have any queue you could potentially complete the entire process in under an hour. That said, you'll also have to check that the country where you want to fly doesn't require you to obtain a visa prior to arrival.