why i can have two locks( X and S) on one record in innodb? i know that S and X lock can not exists at the same time.
You can't. Your S lock is escalated to an X lock with these two queries executed in sequence within the same transaction. You don't have both.
If a second transaction also obtained an S lock on the same records, and then your FOR UPDATE
query were run, it would block at least until the other transaction made its next move, perhaps longer, until the lock escalation could occur or be determined impossibe. Eventually the prompt would return or you'd get a deadlock.