You need to revisit your checking condition or the query you are running before the insert statement If you are using any validation prior to the insert statement.
were you forget to add the dates to your select query?
I believe your verification query should be something like below
select count(*) from your_table where item='lorry' and bookedEndDate ='enddate' and bookedStartDate = 'startDate'
select count(*) from your_table where item='lorry' and bookedStartDate >= 'startDate' and bookedEndDate <='enddate'
try to include the time also.
You may also refer the following link.