I have the following InnoDB table:
+-----------+-----------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default
There are 277259 rows and only some inserts are slow (rare)
Whenever a B-Tree page is full, it needs to be split which takes some time. Insert performance is also slower the more indexes you have, since each insert updates all indexes. 9000
has already stated correctly that your (timestamp,staff) index covers the (timestamp) index in 95% of cases, there are very rare cases when a single-column (timestamp) index will be required for better performance.
There are also some periodic background tasks that can occasionally slow down an insert or two over the course of a day.
Additionally, another reason for delays is simply database activity. If you have transactions that are locking pages that the insert needs to update (or page-split), the insert has to wait until the write locks are acquiesced. These other activity do not even need to actually start a transaction, and they don't even have to be read-read contention; you can also have write-write contention or a queue built up from heavy activity.
And the last possible reason - your database server is out of resources, be it memory or CPU or network i/o. There is only so much a server can do, so it will have to wait until it has enough resources.