Your itinerary should be very indicative. If the schedule says they dock at 7am, you should be able to get off within a few minutes of that time, certainly no later than 7:30, unless there are unexpected delays. It is a misconception that everyone...ship's excursions or not, tries to get off within 5 minutes of the gangway opening. Ship's excursions are frequently spaced out, and some even have scheduled later departures, like 10, or noon or later.
A tender port is a different issue. That is much more complicated. Tendering the bulk of the people off most ships can take 90-120 minutes.