Depends on your state, but that is mostly leagal. For working 8 hours, you must get a 1/2 hour lunch break and at least two 15 minute breaks. Sounds to me like you have 40 / 60 minutes, no big deal.

Make sure you get overtime pay (usually 1.5 x Time over 8hrs) for the time over 8hrs.