No paused/running task, but locks still exist

Problem:
About a week after 2.4/4.0 upgrade (on our way to 2.5/4.1), we ran a CV promotion task. This CV was already successfully promoted to several lifecycle environments. Unfortunately, we got a "{“publication”:[“Invalid hyperlink - object does not exist.”]} error. The task ended up in a paused state. We tried to resume, but it failed instantly. We cancelled the task and while it no longer shows in running or paused, the locks are still in place. We cannot sync repos or run another CV promote as there are conflicting locks. I restarted the Foreman services as that usually cleared cancelled tasks/locks but that has not worked. The task only has a “resume” button now (but isn’t paused) in the monitor. DynFlow console shows task is stuck on “Actions::Pulp3::Repository::RefreshDistribution”. What is the best way to proceed? I would like to get the lock removed so we can upgrade to 2.5/4.1.

Expected outcome:
Locks from cancelled task removed.

Foreman and Proxy versions:
Foreman 2.4.1, Katello 4.0.3

Foreman and Proxy plugin versions:

Distribution and version:
CentOS 7.9

Other relevant data: