How to reset the id of the orders generated by Commerce module
The commerce order module defines two tables, commerce_order and commerce_order_revision; you should truncate both of those to clear the data and reset the AUTO_INCREMENT counter.

In MySQL:

TRUNCATE TABLE commerce_order
TRUNCATE TABLE commerce_order_revision


Or using the API:

db_truncate('commerce_order');
db_truncate('commerce_order_revision');