From the looks of it you want to be able to use subselects, which I don't believe are supported in MySQL yet (I could be wrong as I haven't done mysql in a while). Is there a particular reason you are trying to do:
select * from table where datetime_col >= @dt1 and < @dt2 , are you specifically trying to exclude the last item(s) (by doing < @dt2)?
If so I don't think you need a total of 3 mysql queries I think you can break it down to 2. Just grabbing the highest date and then querying based on data that you derive from that.
I'm not sure what language you're using for all this, but basically just grab the highest date, calculate and store what 5 minutes before that was and then
SELECT * FROM tbl WHERE datetime_col > [var holding highest date - 5 minutes] AND datetime_col != [var holding highest date]
Hope this helps
(I'm only available at the email address provided in my profile on weekdays, if you have questions or advice, during off hours use AIM). Also any views I provide here or on my website are mine and not representative of any views of my work, family, friends and sometimes even myself.