This is a known defect (DE361245), affecting CA API Gateway 9.3 CR1 and CR2.
The deadlock is due to a clearStaleNodes executed right before updateServiceUsage and they end up locking each other.
Note: On the point of view of Gateway, this is not a major concern as we use InnoDB, which is designed to detects the condition and rolls back one of the transactions.
Here an example of the error from the logs:
2018-08-17T09:19:55.487+0900 SEVERE 127 org.hibernate.util.JDBCExceptionReporter: Deadlock found when trying to get lock; try restarting transaction
2018-08-17T09:19:55.487+0900 WARNING 127 com.l7tech.server.cluster.ClusterInfoManagerImpl: error cleaning cluster statuses
org.springframework.dao.CannotAcquireLockException: could not execute update query; SQL [delete from cluster_info where statustimestamp<?]; nested exception is org.hibernate.exception.LockAcquisitionException: could not execute update query