UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jq6Y7ek0bDKdYvrk1aAU/He2ioNlQXyxbs3fMl2jkUM=' 
WHERE 
  key_id = 'a4b93d3812b09ab89ed5c5bf3ef85b4dd60bf7ea2a16f93443fd9fe3828c6e07' 
  AND (
    token = 'jq6Y7ek0bDKdYvrk1aAU/He2ioNlQXyxbs3fMl2jkUM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032