UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Vozf4lp7POrGqfy6e6Bkr8AdGL/7epfCGI6FpkETfjg=' 
WHERE 
  key_id = 'f683af08155dd5fd88ac65c4298efce0c1d31d0e51052ca03a56f52f9f4c4373' 
  AND (
    token = 'Vozf4lp7POrGqfy6e6Bkr8AdGL/7epfCGI6FpkETfjg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020