UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4kNw8aCrZHDY/FXUsz8bTCfR2fktfnhYm8d4w7rnn0I=' 
WHERE 
  key_id = 'fe6bcac38fa36f6a5f53f56af5d57f7db13bc9a23e4c55fe18f281a6ef8fd5b2' 
  AND (
    token = '4kNw8aCrZHDY/FXUsz8bTCfR2fktfnhYm8d4w7rnn0I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033