UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tVEEZQRUfwjDlWFs8lb8XhJZspEUzUkKDvYHVLniKxg=' 
WHERE 
  key_id = '9e700a174bed716497c9446e3d5d8aa6419241c4b680eb0087e700855e9807fc' 
  AND (
    token = 'tVEEZQRUfwjDlWFs8lb8XhJZspEUzUkKDvYHVLniKxg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018