MySQL: Given a list of row values, how do you only return the changed rows?
One solution could be to add a last_updated timestamp on update current_timestamp column to your orders table. So when an update happens, this column is automatically updated by MySQL to contain the current time. 

When you query the database, use the current time minus 5 seconds to compare against the last_updated column i.e.

where last_updated &gt; now()-5

This will give you only the orders updated in the last 5 seconds.

Make sure you add an index on the new last_updated column.