I switched it all to:
function your_callback( $post ) {
$value = "12345";
update_field( "field_534dc7420db07", $value, $post->ID );
}
add_action( 'pending_to_publish', 'your_callback' );
but it has the same effect as before. The current post field gets blanked out, but if I use postid-1 it works fine.