in src/TriggersBinding/MySqlTableChangeMonitor.cs [765:782]
private MySqlCommand BuildReleaseLeasesCommand(MySqlConnection connection, MySqlTransaction transaction)
{
IEnumerable<string> listMatchCondition = this._rowsToRelease.Select(row => $"( {string.Join(" AND ", row.Where(kvp => this._primaryKeyColumnNames.Contains(kvp.Key)).Select(kp => $"{kp.Key} = '{kp.Value}'"))} )");
string combinedMatchConditions = string.Join(" OR ", listMatchCondition);
string releaseLeasesQuery = $@"UPDATE {this._leasesTableName}
SET
{LeasesTableAttemptCountColumnName} = 0,
{LeasesTableLeaseExpirationTimeColumnName} = NULL,
{LeasesTableSyncCompletedTime} = {MYSQL_FUNC_CURRENTTIME}
WHERE
{combinedMatchConditions}
;";
var releaseLeasesCommand = new MySqlCommand(releaseLeasesQuery, connection, transaction);
return releaseLeasesCommand;
}