SCHEMA:
CREATE TABLE table_name_31 (laps INTEGER, time_retired VARCHAR)
USER:
What is the top lap that had a tyre time?

QUERY:
SELECT MAX(laps) FROM table_name_31 WHERE time_retired = "tyre"