It's obviously subjective, but IMOIMHO inline conditionals make code harder to readunderstand, indentation is very important to understand what's going on. So I'd definitely take the second approach, but writing it differently to use only one indentation level:
existing_transaction = database.find_transaction_by_id(transaction.id)
if !existing_transaction
database.create_transaction(transaction)
elsif !existing_transaction.processed
database.update_transaction(transaction)
end