Cannot update custom database table row

I am trying to update a row in a custom database table by $wpdb->update();. In my opinion my code is right but for some reason my database row doesn’t update.

Can anyone help me with this?

I want to update a the status of a transaction in the table wp_mollie_transactions where the transaction_id is equal to the $order_id, which I received from from my payment provider.

(Off course I made $wpdb global in this file)

// Update database
    $wpdb->update( $wpdb->prefix . 'mollie_transactions',
        array(
            'status'    => $payment->status
        ),
        array( 
            'transaction_id'    => $order_id
        )
    );

Solutions Collecting From Web of "Cannot update custom database table row"

Before trying to write to the database, always validate the values you’re putting in:

$fValid = true;
if ( !isset( $payment->status ) ) {
    echo 'Error: Payment status is not set';
    $fValid = false;
}
if ( !isset( $order_id )  ) {
    echo 'Error: Order ID is not set';
    $fValid = false;
}

if ( $fValid ) {
    // Update database
    $fSuccess = $wpdb->update( $wpdb->prefix . 'mollie_transactions',
        array(
            'status'            => $payment->status
        ),
        array( 
            'transaction_id'    => $order_id
        )
    );

    echo sprintf( 'Update %s where Payment Status was %s and Transaction ID was %s', $fSuccess? 'Succeeded':'Failed', $payment->status, $order_id );
}

Cheers.