Normally when update table1 set field='any word' where primarykey=1234 take 1sec. or less but sometimes random take much more time possible 500sec. or more.
I was set very well and never see high CPU, or IOPS
I use MySQL RDS 8.0.17 and workaround was down wait_time from 3600(default) to 200 to close sleep connections and then working better.
Best Answer
Finally was the auto commit as mustaccio told me in a comment: