I believe it goes in the order of EBCI purchase date/time for the trip. That said, if the leg you're on is heavily booked as a connection leg for other flights, I think the folks that were checked in at T-36 for their first leg will be assigned their boarding position for the second leg at T-37+, and you'll be after them regardless of when you purchased your EBCI.