UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '061s3ZKrYNVA8LsER7FpmERPznzvEK5gzAyFiFvA1RU=' 
WHERE 
  key_id = '32396c7dfa8a72392bb29564d1e549a6b32612a303d59a581164d265a9dcfe34' 
  AND (
    token = '061s3ZKrYNVA8LsER7FpmERPznzvEK5gzAyFiFvA1RU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019