Prevent failure in conditional insert in mysql database
Don't bother with SERIALIZABLE.

START TRANSACTION;
SELECT caseid, status, ... FROM ... WHERE ... FOR UPDATE;
check `status`, do some processing
optionally do
    INSERT ...
COMMIT;


With that logic, you can handle lots of concurrent actions.